package com.funo.main.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "U_ORG")
public class Org implements Serializable {

	private static final long serialVersionUID = -3126385372335208612L;

	//主键Id
	@Id
	@Column(name = "ORG_ID")
	private String id;
	
	//上级机构
	@ManyToOne
	@JoinColumn(name = "PARENT_ORG_ID")
	private Org parentOrg;
	
	//排列序号
	@Column(name = "ORDER_NUM")
	private Integer orderNum;
	
	//编码
	@Column(name = "CODE")
	private String code;
	
	//名称
	@Column(name = "NAME")
	private String name;
	
	//组织简介
	@Column(name = "COMMENTS")
	private String comments;
	
	//机构层级
	@Column(name = "ORG_LEVEL")
	private String orgLevel;
	
	//联系电话
	@Column(name = "TEL")
	private String tel;
	
	//传真
	@Column(name = "FAX")
	private String fax;
	
	//地址
	@Column(name = "ADDR")
	private String addr;
	
	//邮编
	@Column(name = "POSTCODE")
	private String postCode;
	
	//操作时间
	@Column(name = "OP_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	private Date opTime;
	
	//操作人姓名
	@Column(name = "OP_USER_NAME")
	private String opUseName;
	
	//状态  1:可用 0:不可用
	@Column(name = "STATUS")
	private Integer status;
	
	//业务生效开始时间
	@Column(name = "START_EFFT")
	@Temporal(TemporalType.TIMESTAMP)
	private Date startEfft;
	
	//业务生效结束时间
	@Column(name = "END_EFFT")
	@Temporal(TemporalType.TIMESTAMP)
	private Date endEfft;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Org getParentOrg() {
		return parentOrg;
	}

	public void setParentOrg(Org parentOrg) {
		this.parentOrg = parentOrg;
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getOrgLevel() {
		return orgLevel;
	}

	public void setOrgLevel(String orgLevel) {
		this.orgLevel = orgLevel;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}

	public String getPostCode() {
		return postCode;
	}

	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	public Date getOpTime() {
		return opTime;
	}

	public void setOpTime(Date opTime) {
		this.opTime = opTime;
	}

	public String getOpUseName() {
		return opUseName;
	}

	public void setOpUseName(String opUseName) {
		this.opUseName = opUseName;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getStartEfft() {
		return startEfft;
	}

	public void setStartEfft(Date startEfft) {
		this.startEfft = startEfft;
	}

	public Date getEndEfft() {
		return endEfft;
	}

	public void setEndEfft(Date endEfft) {
		this.endEfft = endEfft;
	}
	
}
